package com.sen.accest.config;


import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class Knife4jConfig {

    @Bean
    public OpenAPI springShopOpenAPI() {
        log.info("测试地址: http://127.0.0.1:8150/doc.html");
        log.info("swagger访问地址: http://localhost:8150/swagger-ui/index.html");
        log.info("数据地址: http://localhost:8150/v3/api-docs");
        return new OpenAPI()
                // 接口文档标题
                .info(new Info().title("资产管理接口文档")
                        // 接口文档简介
                        .description("这是基于Knife4j OpenApi3的测试接口文档")
                        // 接口文档版本
                        .version("1.0版本")
                        // 开发者联系方式
                        .contact(new Contact().name("韩宗森").email("502982971@qq.com")))
                .externalDocs(new ExternalDocumentation()
                        .description("SpringBoot3测试knife4j")
                        .url("http://127.0.0.1:8150"));
    }

}
